<template>
    <div class="activity-page" id="activity-page">
        <!-- 顶部搜索栏 -->
        <search-sub></search-sub>
        <div class="main">
            <div class="wrap">
                <div class="content" v-html="content"></div>
            </div>
        </div>
    </div>
</template>

<script>
import SearchSub from "@/components/SearchSub.vue";
import {
    detailSlider
} from '../../api/home'
export default {
    components: {
        SearchSub,
    },
    data() {
        return {
            activityId:'',
            content:''
        };
    },
    created(){
        this.activityId = this.$route.params.id;
        this.getDetail()
    },
    methods:{
        getDetail(){
            const that = this;
            console.log('that.activityId',that.activityId)
            detailSlider({
                id:that.activityId
            }).then(res=>{
                if(res.code == 0){
                    that.content = res.data.content;
                }
            })
        }
    }
};
</script>
<style lang="scss" scoped>
    .content{
        padding:12px 0;
    }
    img{
        width: 100%;
        display: block
    }
    p img{
        width: 100%;
        display: block
    }

</style>